(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[44],{114:function(e,t){},146:function(e,t,o){"use strict";var c=o(0),n=o(1),s=o(4),a=o.n(s),r=(o(223),o(79));t.a=({children:e,className:t,screenReaderLabel:o,showSpinner:s=!1,isLoading:l=!0})=>Object(c.createElement)("div",{className:a()(t,{"wc-block-components-loading-mask":l})},l&&s&&Object(c.createElement)(r.a,null),Object(c.createElement)("div",{className:a()({"wc-block-components-loading-mask__children":l}),"aria-hidden":l},e),l&&Object(c.createElement)("span",{className:"screen-reader-text"},o||Object(n.__)("Loading…","woocommerce")))},223:function(e,t){},225:function(e,t){},227:function(e,t,o){"use strict";var c=o(0),n=o(10);const s=Object(c.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)(n.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"}));t.a=s},237:function(e,t,o){"use strict";var c=o(0),n=o(4),s=o.n(n),a=o(1),r=o(76),l=o(227);o(225);var i=({text:e,screenReaderText:t="",element:o="li",className:n="",radius:a="small",children:r=null,...l})=>{const i=o,u=s()(n,"wc-block-components-chip","wc-block-components-chip--radius-"+a),p=Boolean(t&&t!==e);return Object(c.createElement)(i,{className:u,...l},Object(c.createElement)("span",{"aria-hidden":p,className:"wc-block-components-chip__text"},e),p&&Object(c.createElement)("span",{className:"screen-reader-text"},t),r)};t.a=({ariaLabel:e="",className:t="",disabled:o=!1,onRemove:n=(()=>{}),removeOnAnyClick:u=!1,text:p,screenReaderText:m="",...b})=>{const d=u?"span":"button";if(!e){const t=m&&"string"==typeof m?m:p;e="string"!=typeof t?/* translators: Remove chip. */
Object(a.__)("Remove","woocommerce"):Object(a.sprintf)(/* translators: %s text of the chip to remove. */
Object(a.__)('Remove "%s"',"woocommerce"),t)}const g={"aria-label":e,disabled:o,onClick:n,onKeyDown:e=>{"Backspace"!==e.key&&"Delete"!==e.key||n()}},O=u?g:{},j=u?{"aria-hidden":!0}:g;return Object(c.createElement)(i,{...b,...O,className:s()(t,"is-removable"),element:u?"button":b.element,screenReaderText:m,text:p},Object(c.createElement)(d,{className:"wc-block-components-chip__remove",...j},Object(c.createElement)(r.a,{className:"wc-block-components-chip__remove-icon",icon:l.a,size:16})))}},313:function(e,t,o){"use strict";o.d(t,"a",(function(){return i}));var c=o(1),n=o(5),s=o(3),a=o(23),r=o(12),l=o(72);const i=(e="")=>{const{cartCoupons:t,cartIsLoading:o}=Object(l.a)(),{createErrorNotice:i}=Object(n.useDispatch)("core/notices"),{createNotice:u}=Object(n.useDispatch)("core/notices"),{setValidationErrors:p}=Object(n.useDispatch)(s.VALIDATION_STORE_KEY),{isApplyingCoupon:m,isRemovingCoupon:b}=Object(n.useSelect)((e=>{const t=e(s.CART_STORE_KEY);return{isApplyingCoupon:t.isApplyingCoupon(),isRemovingCoupon:t.isRemovingCoupon()}}),[i,u]),{applyCoupon:d,removeCoupon:g}=Object(n.useDispatch)(s.CART_STORE_KEY);return{appliedCoupons:t,isLoading:o,applyCoupon:t=>d(t).then((()=>(Object(r.applyCheckoutFilter)({filterName:"showApplyCouponNotice",defaultValue:!0,arg:{couponCode:t,context:e}})&&u("info",Object(c.sprintf)(/* translators: %s coupon code. */
Object(c.__)('Coupon code "%s" has been applied to your cart.',"woocommerce"),t),{id:"coupon-form",type:"snackbar",context:e}),Promise.resolve(!0)))).catch((e=>(p({coupon:{message:Object(a.decodeEntities)(e.message),hidden:!1}}),Promise.resolve(!1)))),removeCoupon:t=>g(t).then((()=>(Object(r.applyCheckoutFilter)({filterName:"showRemoveCouponNotice",defaultValue:!0,arg:{couponCode:t,context:e}})&&u("info",Object(c.sprintf)(/* translators: %s coupon code. */
Object(c.__)('Coupon code "%s" has been removed from your cart.',"woocommerce"),t),{id:"coupon-form",type:"snackbar",context:e}),Promise.resolve(!0)))).catch((t=>(i(t.message,{id:"coupon-form",context:e}),Promise.resolve(!1)))),isApplyingCoupon:m,isRemovingCoupon:b}}},383:function(e,t){},450:function(e,t,o){"use strict";var c=o(0),n=o(1),s=o(146),a=o(237),r=o(12),l=o(2);o(383);const i={context:"summary"};t.a=({cartCoupons:e=[],currency:t,isRemovingCoupon:o,removeCoupon:u,values:p})=>{const{total_discount:m,total_discount_tax:b}=p,d=parseInt(m,10);if(!d&&0===e.length)return null;const g=parseInt(b,10),O=Object(l.getSetting)("displayCartPricesIncludingTax",!1)?d+g:d,j=Object(r.applyCheckoutFilter)({arg:i,filterName:"coupons",defaultValue:e});return Object(c.createElement)(r.TotalsItem,{className:"wc-block-components-totals-discount",currency:t,description:0!==j.length&&Object(c.createElement)(s.a,{screenReaderLabel:Object(n.__)("Removing coupon…","woocommerce"),isLoading:o,showSpinner:!1},Object(c.createElement)("ul",{className:"wc-block-components-totals-discount__coupon-list"},j.map((e=>Object(c.createElement)(a.a,{key:"coupon-"+e.code,className:"wc-block-components-totals-discount__coupon-list-item",text:e.label,screenReaderText:Object(n.sprintf)(/* translators: %s Coupon code. */
Object(n.__)("Coupon: %s","woocommerce"),e.label),disabled:o,onRemove:()=>{u(e.code)},radius:"large",ariaLabel:Object(n.sprintf)(/* translators: %s is a coupon code. */
Object(n.__)('Remove coupon "%s"',"woocommerce"),e.label)}))))),label:O?Object(n.__)("Discount","woocommerce"):Object(n.__)("Coupons","woocommerce"),value:O?-1*O:"-"})}},532:function(e,t,o){"use strict";o.r(t);var c=o(0),n=o(450),s=o(39),a=o(72),r=o(313),l=o(12);const i=()=>{const{extensions:e,receiveCart:t,...o}=Object(a.a)(),n={extensions:e,cart:o,context:"woocommerce/checkout"};return Object(c.createElement)(l.ExperimentalDiscountsMeta.Slot,{...n})};t.default=({className:e=""})=>{const{cartTotals:t,cartCoupons:o}=Object(a.a)(),{removeCoupon:u,isRemovingCoupon:p}=Object(r.a)("wc/checkout"),m=Object(s.getCurrencyFromPriceResponse)(t);return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(l.TotalsWrapper,{className:e},Object(c.createElement)(n.a,{cartCoupons:o,currency:m,isRemovingCoupon:p,removeCoupon:u,values:t})),Object(c.createElement)(i,null))}},79:function(e,t,o){"use strict";var c=o(0);o(114),t.a=()=>Object(c.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"})}}]);